package org.front.client;

import org.front.client.widget.ContentWidget;
import org.front.client.widget.FooterWidget;
import org.front.client.widget.NavigationWidget;
import org.front.client.widget.TopWidget;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Front implements EntryPoint {

	private TopWidget top;
	private ContentWidget content;
	private NavigationWidget navigation;
	private FooterWidget footer;

	protected EventBus eventBus;

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {

		eventBus = GWT.create(SimpleEventBus.class);

		top = new TopWidget(eventBus);
		navigation = new NavigationWidget(eventBus);
		content = new ContentWidget(eventBus);
		footer = new FooterWidget(eventBus);

		RootPanel.get("top").add(top);
		RootPanel.get("navigation").add(navigation);
		RootPanel.get("content").add(content);
		RootPanel.get("footer").add(footer);
	}
}
